<!DOCTYPE html>
<html lang="en">
<!--header-->
<include file="Public:header"/>
<!--header-->
<section id="main-content">
    <section class="wrapper">
        <h3><i class="fa fa-angle-right"></i> 添加/修改公司信息</h3>

        <!-- BASIC FORM ELELEMNTS -->
        <div class="row mt">
            <div class="col-lg-12">
                <div class="form-panel">
                    <h4 class="mb"><i class="fa fa-angle-right"></i> 公司信息
                        <a class="btn btn-theme btn-default" href="{:U('index')}">返回</a>
                    </h4>
                    <form id="type" class="form-horizontal style-form" method="post" action="{:U('add')}"  enctype="multipart/form-data">

                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">展示图<span style="color: red;">(710px*200px)</span></label>
                            <div class="col-sm-10">
                                <input type="file" name="one[]">
                            </div>
                        </div>
                        <!--<div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">地址图</label>
                            <div class="col-sm-10">
                                <input type="file" name="two[]">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">电话显示图</label>
                            <div class="col-sm-10">
                                <input type="file" name="three[]" multiple="true">
                            </div>
                        </div>-->
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">电话</label>
                            <div class="col-sm-10">
                                <input id="phone" name="phone" value="{$list.phone}" type="text"  class="form-control" placeholder="请输入联系电话">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">地址</label>
                            <div class="col-sm-10">
                                <input   name="address" value="{$list.address}" type="text"  class="form-control" placeholder="请输入公司地址">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">地址经度</label>
                            <div class="col-sm-10">
                                <input   name="jing" value="{$list.jing}" type="text"  class="form-control" placeholder="请输入公司地址经度">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">地址纬度</label>
                            <div class="col-sm-10">
                                <input   name="wei" value="{$list.wei}" type="text"  class="form-control" placeholder="请输入公司地址纬度">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">公司名称</label>
                            <div class="col-sm-10">
                                <input  name="name" value="{$list.name}" type="text"  class="form-control" placeholder="请输入公司名称">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">营业时间</label>
                            <div class="col-sm-10">
                                <input id="y_time" name="y_time" value="{$list.y_time}" type="text"  class="form-control" placeholder="请输入营业时间（如：9:00-18:00）">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">公司简介</label>
                            <div class="col-sm-10">
                                <textarea id="intro" name="intro" class="input">{$list.intro}</textarea>
                            </div>
                        </div>


                        <input type="hidden"  name="id" value="{$list.id}">
                        <input type="hidden"  name="o" value="{$list.one}">
                        <input type="hidden"  name="t" value="{$list.two}">
                        <input type="hidden"  name="h" value="{$list.three}">
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label"></label>
                            <div class="col-sm-10">
                                <input  type="submit"  class="btn btn-theme" value="保存" style="width: 150px;margin-left: 60px">
                                <input  type="reset" class="btn btn-warning" value="重置" style="width: 150px">
                            </div>
                        </div>
                    </form>
                </div>
            </div><!-- col-lg-12-->
        </div><!-- /row -->
    </section>
</section>
<!--footer-->
<include file="Public:footer"/>
<!--footer-->
<script type="text/javascript" src="__PUBLIC__/ui/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="__PUBLIC__/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="__PUBLIC__/kindeditor/lang/zh_CN.js"></script>
<script>
    //编辑器
    var editors;
    KindEditor.ready(function(e){
        editors = e.create("[name=intro]",{
            "width":"700px",
            "height":"300px",
            allowFileManager:true, //允许对上传图片进行管理
            "items":["source", "|", "undo", "redo", "|", "preview","|", "justifyleft", "justifycenter", "justifyright", "justifyfull", "insertorderedlist", "insertunorderedlist", "indent", "outdent", "subscript", "superscript", "clearhtml","|","formatblock", "fontname", "fontsize", "|", "forecolor", "hilitecolor", "bold", "italic", "underline","|", "image"]
        });
    });
    /* $("#tianjia").click(function(){
     editors.sync();
     var intro     = $("#intro").val();
     if($("#id").val()){
     var id    = $("#id").val();
     }else{
     var id    = 0;
     }
     $.ajax({
     type:"post",
     data:{intro:intro,content:content,id:id},
     url:"{:U('add')}",
     success:function (res) {
     if(res.status == 1){
     layer.open({
     title: '分类添加/修改提示：',content: res.info
     });
     }
     if(res.status == 2){
     layer.open({
     title: '分类添加/修改提示：',content: res.info
     });
     }
     }
     })
     });*/

</script>

</body>
</html>
